package com.coocaa.typhoon.api.config;

import com.coocaa.cirrus.common.third.filestore.config.TosProperties;
import com.volcengine.service.imagex.v2.ImagexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author bijiahao
 * @date : 2025/10/13 10:14
 * @description
 */
@Configuration
public class ImageOCRConfig {
    @Autowired
    private TosProperties tosProperties;

    @Bean
    public ImagexService imagexService() {
        ImagexService service = ImagexService.getInstance();
        service.setAccessKey(tosProperties.getTosSecretId());
        service.setSecretKey(tosProperties.getTosSecretKey());
        return service;
    }
}
